<%@ page import="com.hnluchuan.staff.dto.EmployeeFileDTO" %>
<%@ page import="java.util.List" %>
<%@ page import="com.hnluchuan.staff.model.EmployeeFile" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: 49294
  Date: 2018/4/20
  Time: 12:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<form action="${ctx }/admin/employee/sc?id=${n.user.id}"  id="detail-form" class="form-horizontal" method="post" enctype="multipart/form-data">
    <div class="form-group">
        <!-- 职位 -->
        <label class="col-sm-2 control-label">附件上传</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" placeholder="文件描述" name="employeeFileDTOS[0].filedescribe" >
            <input type="file" class="form-control" name="employeeFileDTOS[0].file" >
        </div>
        <label class="col-sm-2 control-label">附件上传</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" placeholder="文件描述" name="employeeFileDTOS[1].filedescribe" >
            <input type="file" class="form-control" name="employeeFileDTOS[1].file" >
        </div>
    </div>
    <div class="form-group">
        <!-- 职位 -->
        <label class="col-sm-2 control-label">附件上传</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" placeholder="文件描述" name="employeeFileDTOS[2].filedescribe">
            <input type="file" class="form-control" name="employeeFileDTOS[2].file"   >
        </div>

    </div>
    <div class="form-group" align="center">
            <input type="submit"  value="提交"  onclick="javascript:return confirm('您确认要提交文件吗？');">
    </div>

</form>
<%
    List<EmployeeFileDTO> filist=(ArrayList<EmployeeFileDTO>) request.getAttribute("filist");
    if(filist!=null){

%>
<div class="form-group" align="center">
        <%

                    for (EmployeeFileDTO e:filist
                            ) {
            %>
    描述:<%=e.getFiledescribe()%> 文件名:<%=e.getFilename()%>
    <a href="${ctx }/admin/employee/download?filename=<%=e.getFilename()%>&id=${n.user.id}">
        下载
    </a><br>
        <%
                     }}
                        %>
</body>
</html>
